
cc.Class({
    extends: cc.Component,

    properties: {
        canvas:cc.Node,

        label:cc.Label,
        bg:cc.Node,
    },

    // LIFE-CYCLE CALLBACKS:

    // onLoad () {},

    start () {

        //this.label =this.getComponentInChildren(cc.label);
        this.node.position =cc.p(0,(-this.canvas.height/2)+100);

        // if(this.label ===null)
        // {
        //     cc.error("nunusnudfasdunf");
        // }else {
        //     this.label.string ="canvas width"+this.canvas.width+" height "+this.canvas.height+" 长宽比"+(this.canvas.width/this.canvas.height)+" 9/16="+(9/16);
        // }

        let fix =(this.canvas.width/this.canvas.height);
        if(fix>1)//横屏
        {
            this.bg.height =1000;


        }else{//竖屏
            this.bg.height =2500;
        }




    },

    // update (dt) {},
});
